Why do we assume that the solutions to the second order differential equation of the form

$$y''=-ky$$

are sines and cosines? Just by inspection it seems pretty obvious that this is the case given that the only difference between $y$ and its second derivative is a negative constant. However, is there a formal way to show that sines and cosines are well-suited solutions to the differential equation?