The answer is no. A counterexample is given by the simple group of order $168$ (every maximal subgroup has index $8$ or $7$). Using the classification of finite simple groups, it has been proven by Guralnick  that this is the only example of a finite nonabelian simple group with this property.
There is a partial converse due to Philip Hall, which states the following
Theorem: Suppose that $G$ is a finite group and that for any maximal subgroup $M$, the index $[G:M]$ is prime or a square of a prime. Then $G$ is solvable.
A proof can be found in Endliche Gruppen by Huppert, pg. 718, Satz VI.9.4. Also in A Course on Group Theory by Rose, pg. 281, Theorem 11.16 and The Theory of Groups by M. Hall, pg. 161, Theorem 10.5.7.
There is also the following result due to Huppert (1954):
Theorem: A finite group $G$ is supersolvable if and only if every maximal subgroup of $G$ has prime index.
Proof: Suppose that $G$ is supersolvable and let $M$ be a maximal subgroup. Now there exists a normal subgroup $P$ of prime order. If $P \leq M$, then $M/P$ is a maximal subgroup of the supersolvable group $G/P$, and the result follows by induction. Otherwise $P \cap M = 1$, and in this case $G = PM$ since $M$ is maximal. In particular $[G:M] = |P|$.
For the other direction, a proof is in Endliche Gruppen by Huppert, pg. 718, Satz VI.9.5, and also in Group Theory by Scott, pg. 226, Theorem 9.3.8 and The Theory of Groups by M. Hall, pg. 162, Theorem 10.5.8.
 R. Guralnick, Subgroups of prime power index in a simple group, Journal of Algebra, Volume 81, Issue 2, April 1983, Pg. 304–311 DOI