If you're only going to choose between September or October, then you will miss something. It's just a matter of choosing what is important to you to experience.
Mid-September through October you will see a lot of Halloween decorations.
Disneyland is still Disneyland but parts of it won't look quite like it does at a non-holiday time of year. In early September, you are likely to see some of the Halloween stuff creeping in. You will also find some special holiday food offerings which is actually pretty nice and doesn't supplant anything offered throughout the rest of the year. Then, of course, there's all the holiday merchandise. The shop windows will probably have a decidedly Halloweenish theme.
If you choose the first half of September, you are likely to find that several rides are down for either holiday overlay or seasonal refurbishment. Haunted Mansion will be closed. Space Mountain will be closed briefly just before Halloweentime starts. A couple other rides are also likely to be closed for maintenance. For example, this past September Pirates of the Caribbean and California Screamin' were closed during this time. This doesn't mean that these same rides will be closed next year, most likely it will be a couple of other rides actually. Disney doesn't usually release refurbishment information like that until much closer to the actual dates of the work unfortunately. In late October, It's a Small World will be closed for its holiday overlay.
In any case, you won't experience the regular Haunted Mansion. It will either be closed or the Nightmare Before Christmas version. I, personally, enjoy both versions and have the benefit of going a few times a year so I can see each, but to some people not seeing the regular HM would be disappointing.
September is likely to be less crowded. October weekends and Halloween party days are likely to be more crowded. One of the parks will close early for the hard-ticketed Halloween event on certain nights in October. If this is something of interest to you to attend, then October would be good. If you don't want to go for one of those, you have to watch for the dates and consider how an early closing of one park might affect your touring plans.
I think if you like Halloween, October will be a nice time to go. The Halloween decorations aren't as pervasive as the Christmas ones. The music track historically has been the regular one heard throughout most of the year unlike the holiday period Thanksgiving-Christmas when they run Christmas music non-stop. A lot of the Halloween events were hard-ticketed this year, so the parade that ran during the day was the regular parade and the fireworks show on non-party nights was non holiday-themed. You will have a greater chance of experiencing more rides in October than September since there will likely be fewer rides down for maintenance, although as mentioned, a couple of rides will have holiday overlays on them and, therefore, not be their traditional selves.