Registration of agreement to sell is neither mandatory nor obligatory. Therefore, it need not be registered. Agreement to sell does not confer any right on the buyer except to prove that buyer and seller agreed to sell that property on the price mentioned in the agreement.
You can say that the agreement to sell is an agreement that sale of such a property shall take place on the terms and conditions mentioned in the agreement.
Hence, you have the right to claim a refund of the booking amount for earnest money (which is mentioned in the agreement to sell) because you are willing to purchase the property but the builder is not.
If the project is registered in RERA you should file a case under Section 18 of the RERA. The builder is bound to refund the booking amount and for this purpose the court shall admit the agreement to sell.