No, they don't need to be married. To breed two of your own ponies, go to the male you want to use and click Stallion Status. Under proposals, pick the female you'd like him to breed with and click Request. Then open Proposals in the left-hand menu, choose Received Requests, and click Accept. (Breeding with other players' ponies works differently, so you may need to look that up separately.)