Lawyers whose friend-of-the-court filings wound up in majority opinions share their advice.