An affidavit is a legal document with which you can make a statement to the court as evidence. The usage of such a document will depend on the court that you are attending and perhaps the type of case that is being heard.
Even if the affidavit may not be the form in which evidence is presented to the court, it can help you get your thoughts organised. This, in turn, may help you to present a clearer cases to the court.