The above correct sentence may also be rewritten to include the past perfect tense:
"I had finished my homework before I practiced the piano."
Using the past perfect tense allows the writer to communicate that an action occurred before another action that also happened in the past. The perfect tenses allow events to be placed in sequential order so that the listener/reader understands the proper sequence of events. Leaving the sentence in the simple past makes the sentence more ambiguous--the listener/reader relies on the word "before" to put the events in sequential order. Using the perfect tense allows for more precise meaning if you are not speaking about the immediate past.
I have attached a link to an online writing lab that gives further information about the use of the perfect tenses.