Under IFR, if there's an ODP published for the departure runway, Part 91 F/K and 121/135 operators are required to follow it whether ATC tells you to or not. See 14 CFR 91.175(f):
(3) Except as provided in paragraph (f)(4) of this section, no pilot may takeoff under IFR from a civil airport having published obstacle departure procedures (ODPs) under part 97 of this chapter for the takeoff runway to be used, unless the pilot uses such ODPs.
(4) Notwithstanding the requirements of paragraph (f)(3) of this section, no pilot may takeoff from an airport under IFR unless:
(i) For part 121 and part 135 operators, the pilot uses a takeoff obstacle clearance or avoidance procedure that ensures compliance with the applicable airplane performance operating limitations requirements under part 121, subpart I or part 135, subpart I for takeoff at that airport; or
(ii) For part 129 operators, the pilot uses a takeoff obstacle clearance or avoidance procedure that ensures compliance with the airplane performance operating limitations prescribed by the State of the operator for takeoff at that airport.
...but "ordinary" Part 91 operators are free to "roll their own," although there are added risks if you don't do this real carefully (a good reason to carry a sectional even if you're only flying IFR).
However, you are not required to follow a SID unless it was included in your clearance. And if there's no ODP for the departure runway, "ordinary" Part 91 operators are free to come up with their own way to get from the runway to the MEA -- and entirely responsible themselves for the consequences.
OTOH, under VFR, DP's (like SID's and ODP's) are
not mandatory for "ordinary" Part 91 opeations unless assigned by ATC. However, as it says in AIM Section 5-2-8...
Pilots operating under 14 CFR Part 91 are strongly encouraged to file and fly a DP at night, during marginal Visual Meteorological Conditions (VMC) and Instrument Meteorological Conditions (IMC), when one is available.
"Strongly encouraged," not "required," except as stated in the quoted regs.
What's "required" by 91.129(g)(1) is any FAA-published procedure requiring
all aircraft to follow some route regardless of VFR or IFR, such as a published noise abatement procedure or the like.