Writing a recommendation letter for yourself, but from the perspective of someone who will then approve and sign it, is often discouraged, but not uncommon.
If you ask someone to write a recommendation letter on your behalf, and they just say to "go ahead and write it yourself" and they'll sign it, don't be discouraged. Just try to write from the perspective of the person who will be signing the letter. The word choice (vocabulary) and writing style should match as well. Presumably, the person will review the letter before signing it and make any necessary changes if it doesn't fully reflect their views.
Don't hold back from highlighting your strengths; this is not the time to be overly modest. You can communicate your accomplishments without sounding like you're bragging.
Knowing what to leave out is almost as important as knowing what to include. Since you know yourself and your history better than anyone else, it may be hard to narrow down what information to include. The best approach is to choose a few key qualities and experiences that suit the position or goal at hand and include those.
When you present the letter to the "writer," try to have it done and ready to sign (as opposed to in draft form), but be willing to revise it if asked. In theory, the letter should be printed on professional-quality paper and ready to mail when you take it to be approved and signed.
If changes are requested, accept them gracefully. Unless the person says there's no need to, be sure to have him or her give final approval.
Please note: The above advice applies mainly to academic and employment reference letters in which your main function in writing the letter is saving the signer time and trouble. You should not write your own letter for character reference letters for court appearances, adoption proceedings and other sensitive legal situations. Similarly, don't have a family member or friend write letters praising you and have others sign them for presentation to the court.
Index of letter of recommendation templates