As a rule, a conditional permanent resident must file Form I-751 to remove the conditions on residence during the 90 days period before his/her 2-years conditional green card expires. To determine the exact date take a look at the front part of your green card and find “Card Expires” date, then using a calendar subtract 90 days (keep in mind possible holidays).
If you do not file Form I-751 in due time, you will automatically lose your conditional permanent resident status and as a result you will likely be deportable from the USA. Meanwhile, if you file the petition too early the USCIS will decline it, so it is better to be precise and apply for removal of conditions within the mentioned 3 months period.
Please note that Form I-751, Petition to Remove Conditions on Residence, is a joint petition, meaning that you and your spouse have to file it to USCIS together. However, it is possible to get a waiver of the joint filing requirement in the following cases: divorce; annulling of the marriage; death of your spouse; you and/or your conditional resident child were battered or subjected to extreme cruelty; the termination of your status and removal would result in “extreme hardship”. In such cases, you may apply as an individual and file Form I-751 before or even after the expiration date. But we recommend not to take risk, meet the deadline, and to consult an immigration attorney if you have any doubts.